<template>
    <div class="Error">
    <lottie :options="defaultOptions" :height="400" :width="400" v-on:animCreated="handleAnimation" />
    <button @click="backToOne">返回</button>
    </div>
</template>

<script>
import * as animationData from "../assets/lottie/404.json";

export default {
    data() {
        return {
            
            defaultOptions: { animationData: animationData.default },
            animationSpeed: 1,
            anim: {}
        }
    },
    methods: {
        handleAnimation: function(anim) {
        this.anim = anim;
        console.log(anim); //这里可以看到 lottie 对象的全部属性
        },
        backToOne(){
            this.$router.go(-1)
        }
    },
}
</script>

<style>

</style>